package dto.resDto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author wuzhicheng
 * @date 2018/11/19
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class ImageResponseData {
    private Integer code;

    private String msg;

    private Object data;

    public ImageResponseData(String url){
        this.code = 0;
        this.msg = "success";
        this.data = new ImageDto(url);
    }
}

@Getter
@Setter
class ImageDto {
    private String src;

    private String title;

    ImageDto(String src) {
        this.src = src;
        this.title = "图片";
    }
}
